<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>194班课程表 - 2021年春季学期课程表</title>

		<link rel="icon" href="img/favicon.ico">
		<link rel="shortcut icon" href="img/favicon.ico">

		<script src="js/jquery-3.4.1.min.js"></script>

		<link rel="stylesheet" href="css/mdui.css">
		<script src="js/mdui.js"></script>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">

		<style type="text/css">
			* {
				-webkit-touch-callout: none;
				-webkit-user-select: none;
				-khtml-user-select: none;
				-moz-user-select: none;
				-ms-user-select: none;
				user-select: none;
			}
			
			.mdui-list-item-avatar {
				pointer-events: none;
			}
			
			#tips {
				background-color: #607D8B;
				color: white;
				padding: 10px;
				text-align: center;
				margin-top: 1px;
				display: none;
			}
			
			.ggtips {
				background-color: #607D8B;
				color: white;
				padding: 10px;
				margin-top: 1px;
			}
			
			#publicTip {
				display: none;
			}
		</style>
	</head>

	<body class="mdui-theme-primary-blue-grey">

		<!--appbar-->
		<div class="mdui-appbar">
			<div class="mdui-toolbar mdui-color-theme">

				<a href="javascript:;" class="mdui-typo-headline">课程表</a>
				<a href="javascript:;" class="mdui-typo-title" id="subtitle"></a>
				<div class="mdui-toolbar-spacer"></div>
				<a href="javascript:;" class="mdui-btn mdui-btn-icon" mdui-menu="{target: '#main-menu'}"><i class="mdui-icon material-icons">more_vert</i></a>

				<ul class="mdui-menu" id="main-menu">
					<li class="mdui-menu-item">
						<a href="page/overview.html" class="mdui-ripple">课程概览</a>
					</li>

					<li class="mdui-menu-item" hidden="hidden">
						<a href="page/srcview.html" class="mdui-ripple">课件资源</a>
					</li>
					<li class="mdui-divider"></li>

					<li class="mdui-menu-item">
						<a href="javascript:dialog_share();" class="mdui-ripple">分享</a>
					</li>

					<li class="mdui-menu-item">
						<a href="javascript:dialog_about();" class="mdui-ripple">关于</a>
					</li>
				</ul>
			</div>

		</div>

		<!--公告栏-->
		<div class="ggtips" id="publicTip">

		</div>

		<!--公告栏-->
		<div class="ggtips" id="onetext">
			正在加载一言...
		</div>

		<!--课程提示栏-->
		<div id="tips">
			null
		</div>

		<!--课程面板-->
		<div class="mdui-panel" id="kechengpanel">

			<!--星期-->
			<div class="mdui-panel-item">
				<div class="mdui-panel-item-header">
					<div class="mdui-panel-item-title">星期一</div>
					<div class="mdui-panel-item-summary">共 7 节课</div>
					<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
				</div>
				<div class="mdui-panel-item-body">

					<!--列表-->
					<ul class="mdui-list">
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">学前心理</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第1-2节</div>
							</div>
						</li>
					
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">学前卫生</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第3-4节</div>
							</div>
						</li>
						
						
						<!--分割线-->
						<li class="mdui-divider"></li>
						
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第5节</div>
							</div>
						</li>

						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">体育</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第6节</div>
							</div>
						</li>

						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">班会</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第7节</div>
							</div>
						</li>

					</ul>

				</div>
			</div>
			<!--星期-->
			<div class="mdui-panel-item">
				<div class="mdui-panel-item-header">
					<div class="mdui-panel-item-title">星期二</div>
					<div class="mdui-panel-item-summary">共 7 节课</div>
					<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
				</div>
				<div class="mdui-panel-item-body">

					<!--列表-->
					<ul class="mdui-list">
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">计算机</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第1-2节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">舞蹈</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第3-4节</div>
							</div>
						</li>
						
						
						<!--分割线-->
						<li class="mdui-divider"></li>
						
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">体育</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第5节</div>
							</div>
						</li>

						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第6-7节</div>
							</div>
						</li>

					</ul>
				</div>
			</div>
			<!--星期-->
			<div class="mdui-panel-item">
				<div class="mdui-panel-item-header">
					<div class="mdui-panel-item-title">星期三</div>
					<div class="mdui-panel-item-summary">共 7 节课</div>
					<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
				</div>
				<div class="mdui-panel-item-body">

					<!--列表-->
					<ul class="mdui-list">

						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第1节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">专业主题(单)</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第2节</div>
							</div>
						</li>

						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">美术</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第3-4节</div>
							</div>
						</li>
						
						
						<!--分割线-->
						<li class="mdui-divider"></li>
						
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">大学语文</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第5-6节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第7节</div>
							</div>
						</li>

					</ul>

				</div>
			</div>
			<!--星期-->
			<div class="mdui-panel-item">
				<div class="mdui-panel-item-header">
					<div class="mdui-panel-item-title">星期四</div>
					<div class="mdui-panel-item-summary">共 7 节课</div>
					<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
				</div>
				<div class="mdui-panel-item-body">

					<!--列表-->
					<ul class="mdui-list">
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">声乐</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第1-2节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">思修</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第3-4节</div>
							</div>
						</li>
						
						
						<!--分割线-->
						<li class="mdui-divider"></li>
						
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第5节</div>
							</div>
						</li>
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">英语</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第6节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第7节</div>
							</div>
						</li>
						
					</ul>

				</div>
			</div>
			<!--星期-->
			<div class="mdui-panel-item">
				<div class="mdui-panel-item-header">
					<div class="mdui-panel-item-title">星期五</div>
					<div class="mdui-panel-item-summary">共 7 节课</div>
					<i class="mdui-panel-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
				</div>
				<div class="mdui-panel-item-body">

					<!--列表-->
					<ul class="mdui-list">
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">学前教育</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第1-2节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">口语</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第3节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/shangwu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">英语</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第4节</div>
							</div>
						</li>
						
						
						<!--分割线-->
						<li class="mdui-divider"></li>
						
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">钢琴</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第5-6节</div>
							</div>
						</li>
						<!--列表项-->
						<li class="mdui-list-item mdui-ripple">
							<div class="mdui-list-item-avatar"><img src="img/xiawu1.png" /></div>
							<div class="mdui-list-item-content">
								<div class="mdui-list-item-title">自习</div>
								<div class="mdui-list-item-text mdui-list-item-one-line">第7节</div>
							</div>
						</li>

					</ul>
				</div>
			</div>

		</div>

		<div class="mdui-card mdui-m-t-2 mdui-shadow-4" id="wzx">

			<p style="text-align: center;"><strong>今天晚自习</strong></p>

			<ul class="mdui-list">
				<li class="mdui-list-item mdui-ripple">
					<div class="mdui-list-item-avatar"><img src="img/wanshang.png" /></div>
					<div class="mdui-list-item-content" id="wzx1">自习</div>
				</li>

				<li class="mdui-list-item mdui-ripple">
					<div class="mdui-list-item-avatar"><img src="img/wanshang.png" /></div>
					<div class="mdui-list-item-content" id="wzx2">自习</div>
				</li>

				<li class="mdui-list-item mdui-ripple">
					<div class="mdui-list-item-avatar"><img src="img/wanshang.png" /></div>
					<div class="mdui-list-item-content" id="wzx3">自习</div>
				</li>

			</ul>

		</div> 

		<div class="mdui-dialog" id="dialog_about">
			<div class="mdui-dialog-title">关于</div>
			<div class="mdui-dialog-content">数据为:194班,2021年春季学期课程表<br/>项目构建时间 2020.2.8<br/>此项目数据于 2021.9.6 统计更新(<a href="javascript:dialog_time();">数据来源</a>)<br />版本:
				<ver>2</ver><br/>开发:
				<a href="https://dabai2017.gitee.io/lead/" target="_blank">冯同学</a><br/><br/>其他:<br/>
			<br/>
				<a href="https://dabai-1259760387.cos.ap-beijing.myqcloud.com/kechengbiao.apk" class="mdui-ripple">课程表Android客户端</a><br/>
				<a href="https://dabai-1259760387.cos.ap-beijing.myqcloud.com/AlarmClock.apk" class="mdui-ripple">课程表Android闹钟插件</a>
				<a href='dabai://kechengbiaoonekey?tip=软件1班课程提醒&note=是否要通过{Android课程表闹钟插件}进行一键部署，此操作会把一周内所有时段的闹钟设置好。&times=7:50,9:50,13:50,15:50,18:50&weeks=1,2,3,5;2,3,4,5;2,3,4;3,5;'>(点击这里一键部署闹钟)</a>
			</div>
			<div class="mdui-dialog-actions">
				<button class="mdui-btn mdui-ripple" mdui-dialog-confirm>确认</button>
			</div>
		</div>

		<div class="mdui-dialog" id="dialog_time">
			<div class="mdui-dialog-title">数据来源</div>
			<div class="mdui-dialog-content">

				<img style="width: 100%;height: auto;" src="img/20210906.jpg" />

				<br />
				<br />*数据仅供参考，具体以学校公布为准
			</div>
			<div class="mdui-dialog-actions">
				<button class="mdui-btn mdui-ripple" mdui-dialog-confirm>确认</button>
			</div>
		</div>

		<div class="mdui-dialog" id="dialog_share">
			<div class="mdui-dialog-title">扫码访问</div>
			<div class="mdui-dialog-content" style="text-align: center;">

				<img src="img/QRCode_865.png" style="width: 200px;" />

			</div>
			<div class="mdui-dialog-actions">
				<button class="mdui-btn mdui-ripple" mdui-dialog-confirm>确认</button>
			</div>
		</div>

		<div class="mdui-dialog" id="class_tip">
			<div class="mdui-dialog-title">详细信息</div>
			<div class="mdui-dialog-content">

				<p id="class_tip_title">课程名称:title</p>
				<p id="class_tip_time" style="font-weight: bold;">上课时间:time</p>

			</div>
			<div class="mdui-dialog-actions">
				<button class="mdui-btn mdui-ripple" mdui-dialog-confirm>关闭</button>
			</div>
		</div>

	</body>

	<script type="text/javascript">
		var $$ = mdui.JQ;

		var inst = new mdui.Panel('#kechengpanel', true);

		//获取星期
		var week = new Date().getDay();

		function dialog_about() {
			var dialog_about = new mdui.Dialog('#dialog_about');
			dialog_about.open();
		}

		function dialog_time() {
			var dialog_time = new mdui.Dialog('#dialog_time');
			dialog_time.open();
		}

		function dialog_share() {
			var dialog_share = new mdui.Dialog('#dialog_share');
			dialog_share.open();
		}

		var subtitle = document.getElementById("subtitle");
		var publicTip = document.getElementById("publicTip");

		var weeksstr = ["日", "一", "二", "三", "四", "五", "六"];

		var dnow = new Date(); //实例化时间函数
		var now = dnow.getTime(); // 获取距 1970 年 1 月 1 日之间的毫秒数
		var n = now - 259200000; // 由于1970.1.1 是星期四，不是星期一，减去后面三天
		//document.write(now);
		var dayIndex = Math.ceil(n / 86400000) - 1;
		var weekIndex = Math.ceil(dayIndex / 7);
		var ds = weekIndex % 2; // 判断单双周

		//特殊日期的公告显示
		if((dnow.getMonth() + 1) == 6 && dnow.getDate() == 1) {
			publicTip.innerHTML = "宝，儿 童 节 快 乐 !";
			publicTip.style.display = "block";
		}

		if(ds == 0) {
			var dsz = ",双周";
		} else {
			var dsz = ",单周";
		}

		var weekstr = "星期" + weeksstr[week];

		subtitle.innerText = "今天" + weekstr;

		var now = new Date();
		var hour = now.getHours(); //得到小时

		var tip = document.getElementById("tips");

		var gg = "今天的课程已经上完，默认展开明天的课程";

		/*
		 * 检查课程上没上完
		 */
		function dayinit(nowhour) {
			if(hour >= nowhour) {
				tip.innerHTML = gg;
				tip.style.display = "block";
				if(week >= 0 && week <= 4) {
					inst.open(week);
				}
			} else {
				if(week >= 1 && week <= 5) {
					inst.open(week - 1);
				}
			}
		}

		var wzx_1 = document.getElementById("wzx1");
		var wzx_2 = document.getElementById("wzx2");
		var wzx_3 = document.getElementById("wzx3");
		var wzx = document.getElementById("wzx");

		switch(weekstr) {
			case "星期日":
				gg = "今天没课，默认展开明天的课程";
				dayinit(0);

				break;

			case "星期一":
				dayinit(17);

				break;

			case "星期二":
				dayinit(16);

				break;

			case "星期三":
				dayinit(17);

				
				break;

			case "星期四":
				dayinit(17);
				
				break;

			case "星期五":
				gg = "明天没课";
				dayinit(12);
				
				
				//晚自习 设置
				//wzx_2.innerHTML = "舞点";
				//wzx_3.innerHTML = "琴点";
				
				break;

			case "星期六":
				gg = "明天没课";
				dayinit(0);
				break;
		}

		var itemarr = document.getElementsByClassName("mdui-list-item");

		for(let i = 0; i < itemarr.length; i++) {
			var itemarr2 = itemarr[i].getElementsByClassName("mdui-list-item-title");
			var itemarr3 = itemarr[i].getElementsByClassName("mdui-list-item-text");

			let titletext = itemarr2[0].outerHTML;
			let texttext = itemarr3[0].outerHTML;

			itemarr[i].onclick = function() {
				//事件处理

				//连续课解释	

				if(texttext.toString().indexOf("1-2") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=8:00&classname=" + titletext + "'>8:10</a> - 9:50");
					return;
				}

				if(texttext.toString().indexOf("3-4") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=10:10&classname=" + titletext + "'>10:20</a> - 12:00");
					return;
				}

				if(texttext.toString().indexOf("5-6") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=14:20&classname=" + titletext + "'>14:30</a> - 16:10");
					return;
				}

				//单节课解释
				if(texttext.toString().indexOf("1") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=8:00&classname=" + titletext + "'>8:10</a> - 8:55");
					return;
				}

				if(texttext.toString().indexOf("2") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=8:55&classname=" + titletext + "'>9:05</a> - 9:50");
					return;
				}

				if(texttext.toString().indexOf("3") != -1) {
					class_tip(titletext, "上午 <a href='dabai://kechengbiao?start=10:10&classname=" + titletext + "'>10:20</a> - 11:05");
					return;
				}

				if(texttext.toString().indexOf("4") != -1) {
					class_tip(titletext, "下午 <a href='dabai://kechengbiao?start=11:05&classname=" + titletext + "'>11:15</a> - 12:00");
					return;
				}

				if(texttext.toString().indexOf("5") != -1) {
					class_tip(titletext, "下午 <a href='dabai://kechengbiao?start=14:20&classname=" + titletext + "'>14:30</a> - 15:15");
					return;
				}

				if(texttext.toString().indexOf("6") != -1) {
					class_tip(titletext, "下午 <a href='dabai://kechengbiao?start=15:15&classname=" + titletext + "'>15:25</a> - 16:10");
					return;
				}

				if(texttext.toString().indexOf("7") != -1) {
					class_tip(titletext, "下午 <a href='dabai://kechengbiao?start=16:10&classname=" + titletext + "'>16:20</a> - 17:05");
					return;
				}

			}
		}

		function class_tip(title, time) {

			var class_tip_titleview = document.getElementById("class_tip_title");
			var class_tip_timeview = document.getElementById("class_tip_time");

			class_tip_titleview.innerHTML = "课程名称：" + title;
			class_tip_timeview.innerHTML = "课程时间：" + time;

			var class_tip = new mdui.Dialog('#class_tip');
			class_tip.open();
		}
	</script>

	<script type="text/javascript">
		var hitokoto = "https://v1.hitokoto.cn";

		var hitText = document.getElementById("onetext");

		var xhr = new XMLHttpRequest();
		xhr.open('get', 'https://v1.hitokoto.cn');
		xhr.onreadystatechange = function() {

			var data = JSON.parse(xhr.responseText);
			hitText.innerHTML = "时间一天天过着，漫无目的";

		}
		xhr.send();
	</script>

</html>